package builder.example;

/**
 * 指挥类，控制造人过程，隔离用户与建造过程的关联
 * @author Chen Guang
 * @date 2019/4/9 0009 上午 11:07
 */
public class PersonDirector {
    private AbstractPersonBuilder pb;

    public PersonDirector(AbstractPersonBuilder pb) {
        this.pb = pb;
    }

    public void createPerson(){
        pb.buildHead();
        pb.buildBody();
        pb.buildArmLeft();
        pb.buildArmRight();
        pb.buildLegLeft();
        pb.buildLegRight();
    }
}
